﻿using System;
using System.Collections.Generic;
using Autodesk.Revit.DB;

namespace YJKSparseDistance.ModelLayer
{
	public class CurveCompare : IEqualityComparer<Curve>
	{
		public bool Equals(Curve x, Curve y)
		{
			if (x == null || y == null)
			{
				return x.Equals(y);
			}
            return (int)x.Intersect(y) == 64;
		}

		public int GetHashCode(Curve obj)
		{
			return obj.GetHashCode();
		}
	}
}
